/**
 * 添加或者修改页面
 */
var IndentOrderInfoDlg = {
    data: {
        indentOrderNum: "",
        dealer: "",
        purchaseId: "",
        time: "",
        checkCode: "",
        remark: ""
    }
};

var check = {
    tableId: "checkTable"
};
layui.use(['form', 'admin', 'ax', 'layedit', 'table', 'tableSelect', 'layer'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;
    var layedit = layui.layedit;
    var lay_table = layui.table;
    var table = layui.table;
    var table_select = layui.tableSelect;
    var layer = layui.layer;

    //让当前iframe弹层高度适应
    admin.iframeAuto();

    var id = $("#indentId").val();
    console.log("传来的id是："+id);

    var Product = {
        tableId: "productTable"
    };

    //表格
    Product.initColumn = function () {
        return [[
            {field: 'id', hide: true, title: '主键'},
            {field: 'productName', sort: false, title: '产品'},
            {field: 'productModelName', sort: false, title: '产品型号'},
            {field: 'productOrderName', sort: false, title: '产品型号'},
            {field: 'batchNumber', sort: true, title: '批次'},
            {field: 'warhouseStr', sort: true, title: '仓库'},
            {field: 'serialNum', sort: true, title: '序列号'},
            {field: 'amount', sort: true, title: '数量'}
        ]];
    };

    // 渲染表格
    var tableResult = table.render({
        elem: '#' + Product.tableId,
        url: Feng.ctxPath + '/sendGoods/detail/'+$("#ids").val(),
        page: true,
        height: "full-158",
        cellMinWidth: 100,
        cols: Product.initColumn()
    });

});